package com.zxjbyte.yiyi.framework.common.core;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
import org.springframework.lang.Nullable;

import java.time.Duration;

/**
 * redis缓存key定义类
 *
 * @Author zhangxingjia
 * @Date 2023/4/3 13:51
 * @Version: 1.0
 */
@Getter
@ToString
@AllArgsConstructor
public class CacheKey{

    /**
     *  key
     */
    private final String key;
    /**
     * 超时时间 秒
     */
    @Nullable
    private Duration expire;

    public CacheKey(String key) {
        this.key = key;
    }
}
